const path = require('path');

function resolve(dir) {
    return path.join(__dirname, dir)
}
const baseUrl = '/';
module.exports = {
    publicPath: '/',
    productionSourceMap: false,
    chainWebpack: config => {
        config.resolve.alias
            .set('@', resolve('/src'))
            .set('components', resolve('/src/components'))
    },
    lintOnSave: false, //关闭eslint规范
    devServer: {
        port: 8080,
        host: "0.0.0.0",
        open: true,
        proxy: {
            '/api': {
                target: 'http://10.1.5.49',
                changeOrigin: true, //是否允许跨越
                pathRewrite: {
                    '^/api': '/api', //重写,
                }
            }
        },
    }
}